home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48_2
/
chasm01.sha
/
chasm.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-23
|
2KB
|
60 lines
/*
* chasm.h - chasm header file
*
* @(#)chasm.h 1.1 91/04/10
*
* Copyright (c) 1991 Steve Scherf
*
* Author: Steve Scherf
* Date: Wed Apr 10 22:53:11 PDT 1991
*
*/
#include <stdio.h>
/* external definitions */
extern FILE *ifp;
extern int pars_err;
extern int add_lab();
#define LOADADR 0x200 /* binaries are loaded at this address */
#define MAXADDR 0xFFF /* maximum addressible memory location */
/* input token definitions */
#define STRING 257 /* string token */
#define REG 258 /* register token */
#define VAR 259 /* variable token */
#define CONST 260 /* long constant token */
#define LABEL 261 /* label token */
#define IBASE 262 /* first instruction */
/* instruction token definitions */
#define ADD 0 /* add */
#define AND 1 /* bitwise and */
#define BCD 2 /* store BCD representation of a number */
#define CLD 3 /* clear display */
#define DATA 4 /* store numeric data in memory (pseudo-instruction) */
#define DEF 5 /* define a constant (pseudo-instruction) */
#define DMP 6 /* dump registers */
#define DSP 7 /* display sprite at coordinates */
#define INK 8 /* input keystroke */
#define JMP 9 /* jump to instruction */
#define JOF 10 /* jump to instruction at offset */
#define JSR 11 /* jump to subroutine */
#define MEM 12 /* allocate memory (pseudo instruction) */
#define MOV 13 /* store a value */
#define OR 14 /* bitwise or */
#define RES 15 /* restore registers */
#define RET 16 /* return from subroutine */
#define RND 17 /* random number */
#define SAR 18 /* subtract and replace */
#define SEQ 19 /* skip if equal */
#define SHL 20 /* bitwise left shift */
#define SHR 21 /* bitwise right shift */
#define SIP 22 /* skip if key pressed */
#define SNE 23 /* skip if not equal */
#define SNP 24 /* skip if not pressed */
#define SSC 25 /* set sprite character */
#define SUB 26 /* subtract */
#define XOR 27 /* bitwise exclusive or */